package handler

import (
	"github.com/gin-gonic/gin"
	"choujiang/common/models"
	"choujiang/common/utils"
	"choujiang/common/consts"
	"choujiang/box_server/service"
)

/**
 @description 获取首页滚动中奖信息
*/
func PrizeUser(c *gin.Context) {
	form := c.Request.Form
	uniqueId := form.Get("uniqueId")
	user := model.GetUserByUniqueId(uniqueId)
	if user == nil {
		utils.Error(consts.ErrUserNotFound, c)
		return
	}
	prizeUser := service.GetPrizeUser()
	utils.JSON(prizeUser, c)
}
